package com.ydj.app.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.ydj.app.protocol.http.cms.CmsCsQrCodeListRes;
import com.ydj.app.protocol.http.cms.CmsCsQrCodeListReq;
import com.ydj.app.protocol.http.web.WebCsQrCodeGetRes;
import com.ydj.app.service.*;
import com.ydj.framework.annotation.AllowGuest;
import com.ydj.framework.exception.CommonException;
import com.ydj.framework.protocol.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/web/csQrCode")
@Api(tags = "WEB-客服二维码")
public class WebCsQrCodeController {

    @Autowired
    private CsQrCodeService csQrCodeService;

    @AllowGuest
    @ResponseBody
    @ApiOperation(value = "获取客服二维码")
    @ApiOperationSupport(order = 10)
    @PostMapping(value = "/get")
    public JsonResult<WebCsQrCodeGetRes> get() throws CommonException {
        WebCsQrCodeGetRes res = csQrCodeService.webGet();
        return JsonResult.success(res);
    }


}